package com.atguigu.ggkt.vod.service.impl;

import com.atguigu.ggkt.model.vod.Chapter;
import com.atguigu.ggkt.model.vod.CourseDescription;
import com.atguigu.ggkt.vod.mapper.CourseDescriptionMapper;
import com.atguigu.ggkt.vod.service.CourseDescriptionService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 课程简介 服务实现类
 * </p>
 *
 * @author wuwei
 * @since 2023-03-05
 */
@Service
public class CourseDescriptionServiceImpl extends ServiceImpl<CourseDescriptionMapper, CourseDescription> implements CourseDescriptionService {

    //根据课程id删除描述
    @Override
    public void removeByCourseId(Long id) {
        LambdaQueryWrapper<CourseDescription> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(CourseDescription::getCourseId,id);
        baseMapper.delete(wrapper);
    }
}
